from Page import Page
from selenium.webdriver.common.by import By

class Page2(Page):
    # 定位器
    # 封装元素的操作方法

    # 1.输入框输入版本号
    banbenname_loc=(By.XPATH,'/html/body/div[1]/div/section/section/main/div[1]/form/div[1]/div/div/div/input')
    def sr_banbenname(self,name):
        self.send_keys(self.banbenname_loc,name)

    # 2.点击搜索按钮
    search_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/form/div[2]/div[1]/div/div/button')

    def click_search(self):
        self.click(self.search_loc)


